Add a getter for the accessible type of a widget class
authorMatthias Clasen <mclasen@redhat.com>
Thu, 14 Jul 2011 02:46:13 +0000 (22:46 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 14 Jul 2011 03:02:25 +0000 (23:02 -0400)
This will be necessary to port out-of-tree a11y implementations
from the atk object factory approach to this new way of doing
things.

docs/reference/gtk/gtk3-sections.txt
gtk/gtk.symbols
gtk/gtkwidget.c
gtk/gtkwidget.h

index c897e1b940a86d1d66e80388cb53f319e190df7a..4050e0955964aa59f13284323266cd2c4a9b3596 100644 (file)
@@ -5052,6 +5052,7 @@ gtk_widget_style_get_property
 gtk_widget_style_get_valist
 gtk_widget_style_attach
 gtk_widget_class_set_accessible_type
+gtk_widget_class_get_accessible_type
 gtk_widget_get_accessible
 gtk_widget_child_focus
 gtk_widget_child_notify
index 38ff633b2fb401707d14b694c31cee92796b5e93..d965806d3676672cb52e35fcb4da854fc50c68a7 100644 (file)
@@ -3464,6 +3464,7 @@ gtk_widget_class_install_style_property
 gtk_widget_class_install_style_property_parser
 gtk_widget_class_list_style_properties
 gtk_widget_class_path
+gtk_widget_class_get_accessible_type
 gtk_widget_class_set_accessible_type
 gtk_widget_compute_expand
 gtk_widget_create_pango_context
index 5491107caa0468d1b3cf8eb6a89c86c4162dc960..d529bba9ba38f022a40942e005b18a6a6bdebc0c 100644 (file)
@@ -11942,6 +11942,29 @@ gtk_widget_class_set_accessible_type (GtkWidgetClass *widget_class,
   priv->accessible_type = type;
 }
 
+/**
+ * gtk_widget_class_get_accessible_type:
+ * @widget_class: class to query the accessible type for
+ *
+ * Returns the #GType for accessibles for widgets of the given
+ * class. See gtk_widget_class_set_accessible_type().
+ *
+ * Returns: the accessible type for @widget_class
+ *
+ * Since: 3.2
+ */
+GType
+gtk_widget_class_get_accessible_type (GtkWidgetClass *widget_class)
+{
+  GtkWidgetClassPrivate *priv;
+
+  g_return_if_fail (GTK_IS_WIDGET_CLASS (widget_class));
+
+  priv = widget_class->priv;
+
+  return priv->accessible_type;
+}
+
 /**
  * gtk_widget_get_accessible:
  * @widget: a #GtkWidget
index 8aa1e1f640925d3da25adde999cf88e899e77b9c..008d0ca268b3c79b578bccc8cf87e51e67d3deaa 100644 (file)
@@ -724,6 +724,7 @@ void             gtk_widget_set_support_multidevice (GtkWidget      *widget,
 /* Accessibility support */
 void             gtk_widget_class_set_accessible_type    (GtkWidgetClass     *widget_class,
                                                           GType               type);
+GType            gtk_widget_class_get_accessible_type    (GtkWidgetClass     *widget_class);
 AtkObject*       gtk_widget_get_accessible               (GtkWidget          *widget);